import request from '/@/utils/request';


export function getArticleList(query:Object) {
    return request({
        url: '/api/v1/system/article/list',
        method: 'get',
        params:query
    })
}


export function getArticle(data:any) {
    return request({
        url: '/api/v1/system/article/get',
        method: 'get',
        params:data,
    })
}

export function addArticleList(data:any) {
    return request({
        url: '/api/v1/system/article/add',
        method: 'post',
        data:data,
    })
}

export function editArticleList(data:any) {
    return request({
        url: '/api/v1/system/article/edit',
        method: 'post',
        data:data,
    })
}

export function deleteArticle(id:any){
    return request({
        url: '/api/v1/system/article/delete',
        method: 'delete',
        data:{"id":id},
    })
}

export function openArticle(id:any){
    return request({
        url: '/api/v1/system/article/open',
        method: 'post',
        data:{"id":id},
    })
}